<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ include file="/common/common.jspf"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<title>文件管理系统</title>
<link rel="stylesheet" type="text/css" href="${proPath }/css/fonts/glyphicons-halflings-regular.ttf">
<link rel="stylesheet" type="text/css" href="${proPath }/css/fonts/glyphicons-halflings-regular.woff">
<link rel="stylesheet" type="text/css" href="${proPath }/css/fonts/glyphicons-halflings-regular.woff2">
<link rel="stylesheet" type="text/css" href="${proPath }/css/bootstrap.min.css">
<!--[if lt IE 9]>
  <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script type="text/javascript" src="${proPath }/js/jquery.min.js"></script>
<script type="text/javascript" src="${proPath }/js/bootstrap.min.js"></script>
<style type="text/css">
.footer{
    position: fixed;
    width: 100%;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    padding: 0px 10px;
    bottom: 0px
}

</style>
</head>
<body>
<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="javascript:void(0)">
        	文件管理系统
      </a>
    </div>
  </div>
</nav>
<ol class="breadcrumb">
	<c:forEach items="${breadcrumbList}" varStatus="fileManagerItems">  
	       <li lid="${breadcrumbList[fn:length(breadcrumbList) - 1 - fileManagerItems.index].id}" 
	           parentId="${breadcrumbList[fn:length(breadcrumbList) - 1 - fileManagerItems.index].parentId}"
	           parentStrCn="${breadcrumbList[fn:length(breadcrumbList) - 1 - fileManagerItems.index].parentStrCn}"
	           level="${breadcrumbList[fn:length(breadcrumbList) - 1 - fileManagerItems.index].level}"
	           fileName="${breadcrumbList[fn:length(breadcrumbList) - 1 - fileManagerItems.index].fileName}"
	           >
	       		<a href="${proPath }/qr/getFileManagerListByParentId?parentId=${breadcrumbList[fn:length(breadcrumbList) - 1 - fileManagerItems.index].id}">${breadcrumbList[fn:length(breadcrumbList) - 1 - fileManagerItems.index].fileName}</a>
	       </li>
	</c:forEach> 
</ol>
<ul class="list-group">
<c:forEach var="fileManager" items="${pageModel.list }" varStatus="status">
	<c:if test="${status.count%2==0 }">
		<li class="list-group-item list-group-item-success">
	</c:if>
	<c:if test="${status.count%2==1 }">
		<li class="list-group-item list-group-item-info">
	</c:if>
	<c:if test="${fileManager.fileType==0}">
		<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
	</c:if>
	<c:if test="${fileManager.fileType==1}">
		<span class="glyphicon glyphicon-file" aria-hidden="true"></span>
	</c:if>
	    <span class="badge" onclick="download('${fileManager.id}')">下载</span>
	    ${fileManager.fileName }
	  </li>
</c:forEach>								
</ul>								
<div class="footer">
	<ul class="pager">
 		<c:if test="${pageModel.pageNo == 1}">
			<li class="disabled"><a href="${proPath}/qr/getFileManagerListByParentId?parentId=${pageModel.list[0].parentId}&pageNo=${pageModel.previousPageNo }"><span aria-hidden="true">←</span>上一页</a></li>
		</c:if>
		<c:if test="${pageModel.pageNo >=2}">
			<li><a href="${proPath}/qr/getFileManagerListByParentId?parentId=${pageModel.list[0].parentId}&pageNo=${pageModel.previousPageNo }"><span aria-hidden="true">←</span>上一页</a></li>
		</c:if>
		<c:if test="${pageModel.pageNo < pageModel.bottomPageNo}">
			<li><a href="${proPath}/qr/getFileManagerListByParentId?parentId=${pageModel.list[0].parentId}&pageNo=${pageModel.nextPageNo }">下一页<span aria-hidden="true">→</span></a></li>
		</c:if>
		<c:if test="${pageModel.pageNo >= pageModel.bottomPageNo}">
			<li  class="disabled"><a href="${proPath}/qr/getFileManagerListByParentId?parentId=${pageModel.list[0].parentId}&pageNo=${pageModel.nextPageNo }">下一页<span aria-hidden="true">→</span></a></li>
		</c:if>
	</ul>
</div>
</body>
<script type="text/javascript">
/* 下载 */
function download(id) {
	window.open("${proPath}/fileManagerController/dowlond?id="+id);
}
</script>
</html>



